/**
 * @format
 */

import { AppRegistry, Platform, UIManager } from 'react-native';
import App from './App';
import { name as appName } from './app.json';

// Enable LayoutAnimation for both Legacy and New Architecture
if (Platform.OS === 'android') {
  // Check if we're in the New Architecture
  if (global.nativeFabricUIManager) {
    // New Architecture approach
    // Layout animations are automatically enabled in New Architecture
    // But you can configure specific animations if needed
    console.log('New Architecture detected - Layout animations are enabled by default');
  } else {
    // Legacy Architecture approach
    if (UIManager.setLayoutAnimationEnabledExperimental) {
      UIManager.setLayoutAnimationEnabledExperimental(true);
      console.log('Legacy Architecture - Layout animations enabled');
    }
  }
}

AppRegistry.registerComponent(appName, () => App);
